Completeness of Hoare Logic over Nonstandard Models
نویسندگان
چکیده
The nonstandard approach to program semantics has successfully resolved the completeness problem of Floyd-Hoare logic. The known versions of nonstandard semantics, the Hungary semantics and axiomatic semantics, are so general that they are absent either from mathematical elegance or from practical usefulness. The aim of this paper is to exhibit a not only mathematically elegant but also practically useful nonstandard semantics. A basic property of computable functions in the standard model N of Peano arithmetic PA is Σ1definability. However, the functions induced by the standard interpretation of while-programs S in nonstandard models M of PA are not always arithmetical. The problem consists in that the standard termination of S in M uses the finiteness in N , which is not the finiteness in M . To this end, we shall give a new interpretation of S in M such that the termination of S uses M -finiteness, and the functions produced by S in all models of PA have the uniform Σ1-definability. Then we define, based on the new semantics of while-programs, a new semantics of Hoare logic in nonstandard models of PA, and show that the standard axiom system of Hoare logic is sound and complete w.r.t. the new semantics. It will be established, in PA, that the Hungary semantics and axiomatic semantics coincide with the new semantics of while-programs. Moreover, various comparisons with the previous results, usefulness of the nonstandard semantics, and remarks on the completeness issues are presented.
منابع مشابه
Completeness of Global Evaluation Logic
Monads serve the abstract encapsulation of side effects in semantics and functional programming. Various monad-based specification languages have been introduced in order to express requirements on generic side-effecting programs. A basic role is played here by global evaluation logic, concerned with formulae which may be thought of as being universally quantified over the state space; this for...
متن کاملA New Perspective for Hoare's Logic and Peano's Arithmetic
Hoare’s logic is an axiomatic system of proving programs correct, which has been extended to be a separation logic to reason about mutable heap structure. We develop the most fundamental logical structure of strongest postcondition of Hoare’s logic in Peano’s arithmetic PA. Let p ∈ L and S be any while-program. The arithmetical definability of N-computable function f S leads to separate S from ...
متن کاملOn Completeness Results of Hoare Logic Relative to the Standard Model
The general completeness problem of Hoare logic relative to the standard model N of Peano arithmetic has been studied by Cook, and it allows for the use of arbitrary arithmetical formulas as assertions. In practice, the assertions would be simple arithmetical formulas, e.g. of a low level in the arithmetical hierarchy. In addition, we find that, by restricting inputs to N , the complexity of th...
متن کاملOn Behavioral Subtyping and Completeness
Behavioral subtyping forces objects of subtypes to behave in the same way as objects of supertypes. It is often favored over standard subtyping because it provides a means to obtain a modular program logic. Relative completeness is a formal property of a Hoare logic that ensures that any failed attempt to verify the correctness of a program is not caused by a weakness of its Hoare rules. In thi...
متن کاملHow to Cook a Complete Hoare Logic for Your Pet OO Language
This paper introduces a general methodology for obtaining complete Hoare logics for object-oriented languages. The methodology is based on a new completeness result of a Hoare logic for a procedural language with dynamically allocated variables. This new result involves a generalization of Gorelick’s seminal completeness result of the standard Hoare logic for recursive procedures with simple va...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1703.00240 شماره
صفحات -
تاریخ انتشار 2017